package com.benson.performance;

public class ExceptionTest {

	public static void main(String[] args){
		int size= 1000;
		
		long start = System.currentTimeMillis();
		for(int i=0;i<size;i++){
			try{
				test();
			}catch (Exception e) {
				e.printStackTrace();
			}
		}
		long end = System.currentTimeMillis();
		
		long first = end - start;
		
		start = System.currentTimeMillis();
		for(int i=0;i<size;i++){			
			test();
		}
		end = System.currentTimeMillis();
		
		System.out.println(first+"-"+(end - start));
	}
	
	public static void test(){
		try {
			Thread.sleep(1);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
